<?php
namespace Rate\Controller;
use Todo\Controller\ApiController;

class RecordController extends ApiController {
    
    protected function _filter(&$where){
        $condition = array();
        if(isset($_REQUEST ['min']) && trim($_REQUEST['min']) != '') $condition[] = 'total >= '.floatval($_REQUEST['min']);
        if(isset($_REQUEST ['max']) && trim($_REQUEST['max']) != '') $condition[] =  'total <= '.floatval($_REQUEST['max']);
        if($condition) $where['_string'] = implode(' AND ', $condition);
    }
  
}